package project.movieMap.baseLib.beans;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import lombok.Data;

@Data
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class")
@JsonIgnoreProperties(ignoreUnknown = true)
public class User {
    //实例化用户必须有用户名和密码
    @JsonCreator
    public User(@JsonProperty("userName") String userName, @JsonProperty("passWord") String passWord) {
        this.userName = userName;
        this.passWord = passWord;
    }
    //用户Id
    private int Id;
    //用户名
    private String userName;
    //用户头像URL
    private String userHeadPicUrl;
    //昵称
    private String nickName;
    //密码
    private String passWord;
    //性别
    private String sex;
    //国家
    private String nation;
}
